<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'stu.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
	<%-- 	<%
			Student stu1=new Student();
			stu1.setStuNo(01);
			stu1.setStuName("张三");
			stu1.setStuAge(23);
			Student stu2=new Student();
			stu2.setStuNo(02);
			stu2.setStuName("李四");
			stu2.setStuAge(25);
			
		 %>
		 
		 学号1：<%=stu1.getStuNo() %><br/>
		 姓名1：<%=stu1.getStuName() %><br/>
		 年龄1：<%=stu1.getStuAge() %><br/>
		学号2：<%=stu2.getStuNo() %><br/>
		 姓名3：<%=stu2.getStuName() %><br/>
		 年龄4：<%=stu2.getStuAge() %>
		 
		 --%>
		 
		 <jsp:useBean id="stu3" class="com.inspur.bean.Student" scope="page"></jsp:useBean>
		 <jsp:useBean id="stu4" class="com.inspur.bean.Student" scope="session"></jsp:useBean>
		 
		 <%
		 	stu3.setStuNo(03);
		 	stu3.setStuName("王五");
		 	stu3.setStuAge(20);
		 	
		 	stu4.setStuNo(04);
		 	stu4.setStuName("小六");
		 	stu4.setStuAge(21);
		  %>
		  
		  学号3：<%=stu3.getStuNo() %>
		 姓名3：<%=stu3.getStuName() %>
		 年龄3：<%=stu3.getStuAge() %>
		   学号4：<%=stu4.getStuNo() %>
		 姓名4：<%=stu4.getStuName() %>
		 年龄4：<%=stu4.getStuAge() %>
  </body>
</html>
